(function() { var RunWhenExtIsReady = function() { var the_function = function() { function launchView(view_name, command, apply_to, paramobject) { apply_to = Ext.get(apply_to); if(!apply_to) { Ext.Msg.alert('View Error', 'A views apply-to control could not be found: ' + apply_to); return; } // This comment intentionally left blank. apply_to.update(''); var state_id = 'shoppingcart'; var state = Trakkware.StateHash.getControlState(state_id); if(!paramobject) paramobject = {}; if(state) { if(!Ext.isEmpty(state.command)) { command = state.command; } } var view = Trakkware.ViewFramework.createView({ view: view_name, command: command, ControlID: 'shoppingcart', controlParams: paramobject, internalParams: {"CheckoutUrl":"/check-out/index.aspx","CartSummaryUrl":"/check-out/cart-summary.aspx","WidthInPixels":120,"HeightInPixels":-1}, standalone: true, callback: function(view_object) { var wrapper_div = apply_to.createChild({tag: 'div'}); view_object.applyToMarkup(wrapper_div); view_object.appliedTo = apply_to; view_object.wrapper = wrapper_div; } }); } var paramarray = {}; try { paramarray = Ext.decode('{}'); } catch(ex) { alert('An invalid param array was provided to this view: ' + paramarray); } launchView('Trakkware.Common.NopCommerce.Views.ShoppingCartView, Trakkware.Common.NopCommerce, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null', 'OVERVIEW', 'ctl00_ctl15', paramarray); }; the_function(); } var continue_checking = true; var timeout_id = null; var check_if_ext_exists = function() { if(Ext && Ext.onReady) { continue_checking = false; clearInterval(timeout_id); Ext.onReady(function() { RunWhenExtIsReady(); }); } } var trakkware_wait_for_ext_timeout = function() { if(continue_checking === true) { alert('The framework used to run this application could not be loaded. Please try refreshing.'); continue_checking = false; } clearInterval(timeout_id); } setTimeout(trakkware_wait_for_ext_timeout, 5000); timeout_id = setInterval(check_if_ext_exists, 250); })();